package com.naiterui.ehp.bs.doctor.utils;

import com.naiterui.ehp.bp.bo.doctor.DoctorLabelBO;
import com.naiterui.ehp.bp.utils.beans.BeanUtil;
import com.naiterui.ehp.bs.doctor.domain.DoctorLabel;

/**
 * 医生标签工具类
 *
 * @author zhoupeipei
 */
public class DoctorLabelUtil {

    /**
     * 从doctorLabel转doctorLabelBO
     *
     * @param doctorLabel
     *
     * @return 非空BO
     */
    public static DoctorLabelBO fromDoctorLabel(DoctorLabel doctorLabel) {
        DoctorLabelBO labelBO = new DoctorLabelBO();
        if (doctorLabel != null) {
            // 复制标签 TODO：待doctor实体迁移回doctor服务后，从dao层查出的医生信息自带Label属性
            BeanUtil.copyProperties(doctorLabel, labelBO);
        }
        return labelBO;
    }
}
